feat: Add paths getter, toString, and toDot to PathTrie for debugging #320
feat: Add paths getter, toString, and toDot to PathTrie for debugging #320nielsenko merged 1 commit intoserverpod:mainfrom
Conversation
📝 WalkthroughWalkthroughAdds debugging support to PathTrie by introducing a public API to enumerate all registered path patterns via a Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #320 +/- ##
==========================================
+ Coverage 91.18% 91.31% +0.12%
==========================================
Files 97 97
Lines 3723 3777 +54
Branches 1905 1929 +24
==========================================
+ Hits 3395 3449 +54
Misses 328 328
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Adds the ability to enumerate and visualize all registered paths in a PathTrie for debugging routing issues. - Add `paths` getter that returns an Iterable<String> of all registered paths - Add `toString()` override for quick debugging output - Add `toDot()` method for DOT graph visualization (Graphviz compatible) - Use cycle detection to handle recursive attachment scenarios - Paths are returned in deterministic order (literals sorted, then dynamic) Closes serverpod#319
1e4279d to
f5840f7
Compare
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Description
Adds debugging functionality to
PathTriefor diagnosing routing issues:pathsgetter - Returns all registered path patterns asIterable<String>toString()override - Quick text dump of all pathstoDot()method - DOT graph output for Graphviz visualization, with cycles from self-attachment shown as dashed red edgesAll methods handle cycles created by self-attachment.
Related Issues
Pre-Launch Checklist
///), ensuring consistency with existing project documentation.Breaking Changes
Summary by CodeRabbit
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.